//---------------------------------------------------------------------------


#pragma hdrstop

#include <string.h>

#include "translateHexun.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)

#include <stdio.h>

translateFuture(char *str_i, StockRecord *stockRecord_o)
{
  int num = 0;
  char *str_loc = str_i;
  // find IF1007
  if ((str_loc = strstr(str_i, "IF1007")) == NULL)
    return num;
  else
    str_loc += strlen("IF1007");

  str_i = str_loc;
  if ((str_loc = strstr(str_i, "font color")) == NULL)
    return num;
  else
    str_loc += strlen("font color");

  str_i = str_loc;
  if ((str_loc = strstr(str_i, ">")) == NULL)
    return num;
  else
    str_loc += strlen(">");
  if (sscanf(str_loc, "%f", &stockRecord_o->close)==1)
  {
    num++;
  }

  return num;

}
